<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:mo="https://gitee.com/aun/Timo">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
    <div class="layui-form timo-compile">
    <form th:action="@{/app/info/save}">
        <input type="hidden" name="id" th:if="${appInfo}" th:value="${appInfo.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">项目名称</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="display_name" placeholder="请输入项目名称" th:value="${appInfo?.display_name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">代码仓库类型</label>
            <div class="layui-input-inline">
                <select class="timo-search-select layui-input" name="repo_type" mo:dict="APP_REPO_TYPE" mo-selected="${appInfo?.repo_type}"></select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">代码仓库URL</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="repo_url" placeholder="请输入代码仓库URL" th:value="${appInfo?.repo_url}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">基线分支</label>
            <div class="layui-input-inline">
                <select class="timo-search-select layui-input" name="base" mo:dict="APP_BASE_TYPE" mo-selected="${appInfo?.base}"></select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">选择代码仓库账号</label>
            <div class="layui-input-inline">
                <div th:replace="/common/fragment :: selectTag('repo_account_id',${accounts},${appInfo?.repo_account_id},'id','account','')"></div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">所属产品线</label>
            <div class="layui-input-inline">
                <div th:replace="/common/fragment :: selectTag('prod_line_id',${prodLines},${appInfo?.prod_line_id},'id','title','')"></div>
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>